<?php

namespace App\Http\Admin\Controllers\Order;


use App\Http\Admin\Services\Order\OrderService;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;


class OrderMarryController extends Controller
{
    protected $service;

    public function __construct(OrderService $orderService)
    {
        $this->service = $orderService;
    }

    /*
     *视图
     */
    public function index(){
        return view('order.order_marry');
    }

    /*
     *厂家打印记录订单
     */
    public function printOrder(Request $request){
        $attributes =   $request->all();
        $result = $this->service->printOrder($attributes);
        return res('ok', $result);

    }

    /*
     *回填订单
     */
    public function backOrder(Request $request){

        $result = $this->service->backOrder();
        return res('ok', $result);

    }
}